<?php

use Sharks\Core\Support\FrontEnd\Asset;
use Sharks\Core\Support\Base\Precondition;

/**
 * 获取静态资源
 * @param $params
 * @param $smarty
 */
function smarty_function_asset($params, &$smarty) {
	Precondition::checkInArray($params, 'name');
	Precondition::checkNotEmpty($params['name']);
		
	echo Asset::load($params['name']);
}